package com.cxh.androidmedia.activity.opengles;

import android.opengl.GLSurfaceView;

import com.cxh.androidmedia.R;
import com.cxh.androidmedia.base.BaseActivity;
import com.cxh.androidmedia.render_new.render.LightLearnRender;

import butterknife.BindView;

public class GLESLightActivity extends BaseActivity {

    @BindView(R.id.gl_surfaceview)
    GLSurfaceView mSurfaceView;

    private LightLearnRender mDrawRender;

    @Override
    protected int getLayoutRes() {
        return R.layout.activity_gl_render_common;
    }

    @Override
    protected void init() {
        mDrawRender = new LightLearnRender();
        mSurfaceView.setZOrderOnTop(true);
        mSurfaceView.setKeepScreenOn(true);
        mSurfaceView.setEGLContextClientVersion(3);
        mSurfaceView.setRenderer(mDrawRender);
        mSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
    }

    @Override
    protected void onResume() {
        super.onResume();
        mSurfaceView.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
        mSurfaceView.onPause();
    }
}
